<!DOCTYPE html>
<script src="full-screen-test.js"></script>
<style type="text/css">
#v {
  -webkit-writing-mode: vertical-rl;
}
</style>

<div id="v"><span id="fullscreen"></span></div>

<script>
(function () {
  if (!window.eventSender) {
    logResult(false, "This test requires eventSender");
    return;
  }

  function fullscreenChanged()
  {
    if (document.webkitIsFullScreen) {
      logResult(true, "entered fullscreen");
      document.exitFullscreen();
      return;
    }
    logResult(true, "exited fullscreen");
    endTest();
  }

  waitForEvent(document, "fullscreenchange", fullscreenChanged);
  waitForEvent(document, "webkitfullscreenchange", fullscreenChanged);

  runWithKeyDown(function () {
    logResult(true, "entering fullscreen");
    fullscreen.webkitRequestFullscreen();
  });
})();
</script>
